package logic;
public class ThreadDeletedMessages implements Runnable {
	private Server server;
	public ThreadDeletedMessages(Server server)
	{
		this.setServer(server);
	}
	public void run()
	{
		while(!server.getDeletedMessages().isEmpty())
		{
			DeletedMessage message = server.getDeletedMessages().get(0);
			
			server.getDeletedFiles().deleteFileID(message.getIp(), message.getFileID());
			server.getDeletedMessages().remove(0);
		}
		
	}
	public Server getServer() {
		return server;
	}
	public void setServer(Server server) {
		this.server = server;
	}
}
